﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Control.Bus;

namespace Control.Dal
{
    class DalStaff
    {

        internal static BusStaff DangNhap(BusStaff busStaff)
        {
            var staffs = from s in DalCommon.Database.Staffs
                         where s.UserName == busStaff.UserName && s.PassWord == busStaff.PassWord
                         select new BusStaff()
                         {
                             ID = s.ID,
                             UserName = s.UserName,
                             PassWord = s.PassWord
                         };
            return staffs.FirstOrDefault<BusStaff>();
        }
    }
}
